<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateQaecmsAdminsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('qaecms_admins', function (Blueprint $table) {
            $table->increments('id')->comment('管理员ID自增');
            $table->char('name','200')->unique('name')->comment('管理员名称');
            $table->string('password')->comment('管理员密码');
            $table->string('email')->comment('管理员邮箱');
            $table->dateTime('logintime')->comment('管理员登陆时间')->nullable();
            $table->ipAddress('loginip')->comment('管理员登录IP')->nullable();
            $table->string('loginaddress')->comment('管理员登录地址')->nullable();
            $table->dateTime('lastlogintime')->comment('管理员上次登录时间')->nullable();
            $table->ipAddress('lastloginip')->comment('管理员上次登录IP')->nullable();
            $table->string('lastloginaddress')->comment('管理员上次登录地址')->nullable();
            $table->rememberToken();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('qaecms_admins');
    }
}
